package cn.stylefeng.guns.sys.modular.system.mapper;

import cn.stylefeng.guns.sys.modular.system.entity.ZxChengben;
import cn.stylefeng.guns.sys.modular.system.entity.ZxChengbenMingxi;
import cn.stylefeng.guns.sys.modular.system.model.params.ZxChengbenMingxiParam;
import cn.stylefeng.guns.sys.modular.system.model.result.SelectResult;
import cn.stylefeng.guns.sys.modular.system.model.result.ZxChengbenMingxiResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author modular/system
 * @since 2020-11-19
 */
public interface ZxChengbenMingxiMapper extends BaseMapper<ZxChengbenMingxi> {

    /**
     * 获取列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    List<ZxChengbenMingxiResult> customList(@Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    /**
     * 获取map列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    Page<ZxChengbenMingxiResult> customPageList(@Param("page") Page page, @Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author modular/system
     * @Date 2020-11-19
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    BigDecimal calculateChengbenJine(@Param("btyZxChengbenId") Long btyZxChengbenId);

    List<ZxChengbenMingxiResult> selectAllMingXiUnderLevel(@Param("paramCondition") ZxChengbenMingxiParam param);

    List<ZxChengbenMingxiResult> selectAllMingXiAndKemuInfo();

    List<SelectResult> queryCreateUser();

    void updateKemuByHuopinId(@Param("btyZxHuopinId") String btyZxHuopinId);

    void updateKemuByHuopin();
    void updateStatusNull();

    IPage tzqkMingXiList(@Param("page") Page page, @Param("paramCondition") ZxChengbenMingxiParam paramCondition);

    void updateBySpec(@Param("param")ZxChengbenMingxiParam param);

    List<Map<String, Object>> listMingxiDetail(@Param("param") ZxChengbenMingxiParam param);

    void updateMendian(@Param("id") String id, @Param("btyZxMdzxId") String btyZxMdzxId);

    /**
     * 根据 装修成本明细id 查询门店id
     * @param btyZxChengbenMingxiId
     * @return
     */
    Long getMdzxId(@Param("btyZxChengbenMingxiId") Long btyZxChengbenMingxiId);

    void updateMingxi(@Param("param") ZxChengbenMingxi zxChengbenMingxi);

    void updateCb(@Param("param")ZxChengben chengben);

    void updateCbmx(@Param("param")ZxChengbenMingxi chengbenMingxi);

    ZxChengbenMingxi getId(@Param("param") ZxChengbenMingxiParam mingxiParam);

    Map getKeyId(String keyword);

    String getMdzxIdByDm(String dm);

    void updateMd();

    void insertMx(@Param("list") List<ZxChengbenMingxi> list);
}






